package com.business.business.web.web;

import cn.hutool.json.JSONObject;
import com.business.business.common.base.BaseController;
import com.business.business.support.annotaion.Action;
import com.business.business.support.model.RespEntity;
import com.business.business.web.service.PictureService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.annotation.Resource;

@Action
@RequestMapping(value="/picture")
//图片
public class PictureController extends BaseController {
    @Resource
    private PictureService pictureService;

    //新增
    @RequestMapping(value = "/add", method = RequestMethod.POST)
    public RespEntity add(@RequestBody(required = false) JSONObject jsonParam) {
        return this.pictureService.add(jsonParam);
    }

    //删除
    @RequestMapping(value = "/delete", method = RequestMethod.POST)
    public RespEntity delete(@RequestBody(required = false) JSONObject jsonParam) {
        return this.pictureService.delete(jsonParam);
    }

    //详情
    @RequestMapping(value = "pictureList", method = RequestMethod.GET)
    public RespEntity pictureList(@RequestBody(required = false) JSONObject jsonParam) {
        return this.pictureService.pictureList(jsonParam);
    }
}
